ROS2 custom RQT plugin
Table of Content
ros2 pkg create rqt_mypkg --build-type ament_python --dependencies rclpy rqt_gui rqt_gui_py
src/rqt_mypkg/
├── package.xml
├── plugin.xml
├── resource
│ ├── MyPlugin.ui
│ └── rqt_mypkg
├── rqt_mypkg
│ ├── __init__.py
│ ├── my_module.py
│ └── main.py
├── setup.cfg
└── setup.py
package.xml#
- Add line to export section
package.xml
<export>
<build_type>ament_python</build_type>
<rqt_gui plugin="${prefix}/plugin.xml"/>
</export>
plugin.xml#
- Place file in package root folder
package.xml
<library path="src">
<class name="My Plugin" type="rqt_mypkg.my_module.MyPlugin" base_class_type="rqt_gui_py::Plugin">
<description>
An example Python GUI plugin to create a great user interface.
</description>
<qtgui>
<group>
<label>Visualization</label>
</group>
<!--<group>
<label>Subgroup</label>
</group>
-->
<label>My first Python Plugin</label>
<icon type="theme">system-help</icon>
<statustip>Great user interface to provide real value.</statustip>
</qtgui>
</class>
</library>